package com.example.myapplication

fun main() {
    val nums=arrayOf(1,2,3,4,5,6)
    val nums2=nums.map { num: Int->num*2 }
    println(nums2)
    val nums3=nums.map { it*2 }
    println(nums3)
    val nums4=nums.map { it>=4 }
    val nums5=nums.map { num:Int->num>=4 }
    println(nums4)
    println(nums5)

    val res2=calculate(10000,8){a,b->a*b}
    println(res2)
}

fun calculate(a: Int, b: Int, operation: (Int, Int) -> Int,): Int {
    return operation(a, b)
}
